<!-- 商户入驻申请记录 -->
<div class="search">
  <nz-select style="width:100px;" [(ngModel)]="iscontact" nzAllowClear nzPlaceHolder="联系状态" (ngModelChange)="searchData()">
    <nz-option *ngFor="let item of statuslist" [nzValue]="item.key" [nzLabel]="item.value"></nz-option>
  </nz-select>
  申请日期:
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="sdate" nzPlaceHolder="开始日期">
  </nz-date-picker>
  ~
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="edate" nzPlaceHolder="结束日期">
  </nz-date-picker>
  <a (click)="searchData()">查询</a>
</div>

<nz-table #ajaxTable nzShowSizeChanger [nzFrontPagination]="false" [nzData]="dataSet" [nzLoading]="loading" [nzTotal]="total"
  [nzShowTotal]="totalTemplate" [(nzPageIndex)]="pageIndex" [(nzPageSize)]="pageSize" (nzPageIndexChange)="searchData()"
  (nzPageSizeChange)="searchData(true)" [nzScroll]="{ x:'1300px',y: '600px' }">
  <thead>
    <tr>
      <th nzWidth="60px" nzLeft="0px">序号</th>
      <th nzWidth="100px">联系人</th>
      <th nzWidth="100px">联系电话</th>
      <th nzWidth="100px">餐厅名称</th>
      <th nzWidth="100px">所在区域</th>
      <th nzWidth="100px">营业执照</th>
      <th nzWidth="150px">提交日期</th>
      <th nzWidth="150px">联系状态</th>
      <th nzWidth="150px">备注</th>
      <th nzWidth="160px" nzRight="0px">操作</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of ajaxTable.data;index as i">
      <td nzLeft="0px">{{i+1}}</td>
      <td>{{data.name}}</td>
      <td>{{data.phone}}</td>
      <td>{{data.merchantname}}</td>
      <td>{{data.area}}</td>
      <td><img *ngIf="data.certificate" [src]="data.certificate" class="avatar" style="width: 50px; height:50px;"></td>
     
      <td>{{data.createTime | date:"yyyy/MM/dd HH:mm"}}</td>
      <td>{{data.iscontact}}</td>
      <td>{{data.remarks}}</td>
      <td nzRight="0px">
        <a *ngIf="data.iscontact=='未联系'" (click)="EditConnect(data._id,'')">标记已联系</a>
        <a (click)="Edit(data._id)">编辑备注</a>
        <a (click)="BigPic(data.certificate)">查看营业执照</a>
      </td>
    </tr>
  </tbody>
</nz-table>

<ng-template #totalTemplate let-total>
  共 {{total}} 条
</ng-template>

<nz-modal [(nzVisible)]="isinfoVisible" nzTitle="商户信息" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" nzWrapClassName="vertical-center-modal"
  [nzMaskClosable]="false" nzWidth="800">
  <div style="margin-bottom: 16px;">
    <nz-input-group nzAddOnBefore="备注">
      <input type="text" nz-input [(ngModel)]="doc.remarks">
    </nz-input-group>
  </div>
</nz-modal>


<nz-modal [(nzVisible)]="isVisible" nzTitle="大图" (nzOnCancel)="bhandleCancel()" (nzOnOk)="bhandleOk()" nzWrapClassName="vertical-center-modal"
  [nzMaskClosable]="false" nzWidth="800">
  <div style="margin-bottom: 16px;">
      <img  [src]="this.certificate" class="avatar" style="width: 500px; height:600px;">
  </div>
</nz-modal>